package com.lhkj.ct.framework.filter;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

/**
 * <p>
 *     替换适配nginx反代的request对象的过滤器
 * </p>
 */
public class ParamsFilter implements Filter {

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
        ParameterRequestWrapper paramsRequest = new ParameterRequestWrapper(  (HttpServletRequest) request);
        chain.doFilter(paramsRequest, response);
    }

    @Override
    public void init(FilterConfig arg0)   {
    }

    @Override
    public void destroy() {
    }
}
